package com.listeningframework.boot.codegen;

import com.listeningframework.boot.codegen.exception.CodeGenException;
import com.listeningframework.boot.codegen.generators.GeneratorFactory;
import org.apache.maven.plugins.annotations.Execute;
import org.apache.maven.plugins.annotations.LifecyclePhase;
import org.apache.maven.plugins.annotations.Mojo;
import org.apache.maven.plugins.annotations.ResolutionScope;

/**
 * Goal which touches a timestamp file.
 */
@Mojo(name = "generate", requiresDependencyResolution = ResolutionScope.TEST)
@Execute(phase = LifecyclePhase.TEST_COMPILE)
public class GenerateMojo extends AbstractCodeGenMojo {


    @Override
    protected void handleSubExecute() throws CodeGenException {
        GeneratorFactory.newinstance().generate();
    }
}
